package com.qi.springcloud.serviceorder.service;


import com.qi.springcloud.serviceorder.bean.Order;
import com.qi.springcloud.serviceorder.dao.OrderMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 源码学院-Fox
 * 只为培养BAT程序员而生
 * http://com.qi.springcloud
 * 往期视频加群:516212256 暗号:6
 */
@Service
public class OrderServiceImpl implements OrderService {

    @Autowired
    private OrderMapper orderMapper;

    @Override
    public void insert(Order order) {
        orderMapper.insert(order);
    }

    @Override
    public Order getById(Integer id) {
        return orderMapper.getById(id);
    }

    @Override
    public List<Order> findOrderByUserId(Integer userId) {
        return orderMapper.findOrderByUserId(userId);
    }
}
